//
//  ArqEncryption.h
//  arq
//
//  Created by xiao wen on 15/1/20.
//  Copyright (c) 2015年 witsi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DataTransmitImp.h"

@interface ArqEncryption : NSObject{
@private
    void *pCppObj;
}


-(id) initWith:(DataTransmitImp*)dataTransmit;

-(int) sha1:(NSData*)msg returnData:(NSData**)sha1buf;
-(int) sha256:(NSData*)msg returnData:(NSData**)sha256buf;
-(int) desOperationMode:(int)mode key:(NSData*)keybuf data:(NSData*)databuf returnData:(NSData**)recbuf;
-(int) des3OperationMode:(int)mode key:(NSData*)keybuf data:(NSData*)databuf returnData:(NSData**)recbuf;
-(int) macCalculateIndex:(int)index mac:(NSData*)macbuf para:(NSData*)parabuf returnData:(NSData**)recbuf;
-(int) pinCipherTextIndex:(int)index password:(NSString*)password pan:(NSString*)pan returnData:(NSData**)retPin;
-(int) trackEncryptIndex:(int)index input:(NSData*)ins para:(NSData*)parabuf retrun:(NSData**)recbuf;
-(int) commMac:(int)index mac:(NSData*)macbuf para:(NSData*)parabuf returnData:(NSData**)recbuf;
-(int) commDataEncrypt:(int)index iData:(NSData*)in para:(NSData*)parabuf returnData:(NSData**)recbuf;
-(int) commTrackEncrypt:(int)index withTk2:(NSString*)track2 withTk3:(NSString*)track3
                  para:(NSData*)parabuf retrun:(NSData**)recbuf;
-(int)importDukptKeyGroup:(int)gid withStrKeyBuf:(NSString*)keybuf withStrCheckData:(NSString*)checkData
        withStrCheckValue:(NSString*)checkValue withStrKsn:(NSString*)ksn
      withStrKsnCheckData:(NSString*)ksnCheckData withStrKsnCheckValue:(NSString*)ksnCheckValue;
-(int)getCurrKsn:(NSData**)ksn withKsnBufLen:(int)nKsnBufLen;

    
@end
